<template>
  <div>
    <Modal v-model="modal.detail" title="详情" width="1020">
      <div class="detail-info">
        <Row>
          <i-col span="11">
            <span class="detail-title">用户编号：</span>
            <span v-text="form.id"></span>
          </i-col>
          
          <i-col span="11">
            <span class="detail-title">手机号：</span>
            <span v-text="form.phone"></span>
          </i-col>
        
          <i-col span="11">
            <span class="detail-title">用户邮箱：</span>
            <span v-text="form.email"></span>
          </i-col>
          
          <i-col span="11">
            <span class="detail-title">是否激活：</span>
            <span v-text="form.isActive"></span>
          </i-col>
        
          <i-col span="11">
            <span class="detail-title">加密盐值：</span>
            <span v-text="form.salt"></span>
          </i-col>
          
          <i-col span="11">
            <span class="detail-title">版本号：</span>
            <span v-text="form.version"></span>
          </i-col>
        
          <i-col span="11">
            <span class="detail-title">创建时间：</span>
            <span v-text="form.createTime"></span>
          </i-col>
          
          <i-col span="11">
            <span class="detail-title">更新时间：</span>
            <span v-text="form.updateTime"></span>
          </i-col>
        </Row>
      </div>
    </Modal>
  </div>
</template>

<script>
	import * as utils from '@/api/utils-v2'
	import * as ResponseStatus from '@/api/response-status'
export default {
  name: 'UserDetail',
  data() {
    return {
      modal: {
        detail: false
      },
	  dataDictCodes: ['IS_ACTIVE'],
	  dataDictItems: {},
      form: {
        id: null,
        phone: null,
        email: null,
        password: null,
        salt: null,
        version: null,
        createTime: null,
        updateTime: null,
        isActive: null
      }
    }
  },
  computed: {},
  mounted() {
		// let dictItem = utils.getDataDictItemDisplayValue(this, 'IS_ACTIVE', this.form.isActive)
		// this.form.isActive = dictItem.displayValue
	},
  methods: {
	   getDictItemsDisplayValue() {
		  utils.getDataDict(this.dataDictCodes).then(response => {
		  if (response) {
			  this.dataDictItems = response
			  
			  utils.getDetailDictItemDisplayValue(this, 'IS_ACTIVE', 'isActive')
		  }
		  }).catch(error => {
		  console.log(error)
		  })
	  }
  }
}
</script>

<style>
.detail-info .ivu-col {
  margin-bottom: 10px;
}

.detail-title {
  font-weight: bold;
}
</style>
